import request from '@/utils/request'

// 查询预警类别列表
export function listPrewarn(query) {
  return request({
    url: '/system/health/prewarn/list',
    method: 'get',
    params: query
  })
}
// 批量处理预警
export function updateHandlePrewarn(data) {
  return request({
    url: '/system/health/prewarn/updateHandleStatus',
    method: 'post',
    data: data
  })
}

// 查询预警类别详细
export function getPrewarn(prewarnId) {
  return request({
    url: '/system/health/prewarn/' + prewarnId,
    method: 'get'
  })
}

// 新增预警类别
export function addPrewarn(data) {
  return request({
    url: '/system/health/prewarn',
    method: 'post',
    data: data
  })
}

// 修改预警类别
export function updatePrewarn(data) {
  return request({
    url: '/system/health/prewarn',
    method: 'put',
    data: data
  })
}

// 删除预警类别
export function delPrewarn(prewarnId) {
  return request({
    url: '/system/health/prewarn/' + prewarnId,
    method: 'delete'
  })
}
